<%@ Page Language="C#" Debug="true" %>
<%@ import Namespace="System" %>
<%@ import Namespace="System.IO" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<%@ import Namespace="System.Data.Common" %>
<%@ import Namespace="System.Xml" %>
<%@ import Namespace="System.Xml.XPath" %>
<%@ import Namespace="System.Web" %>

<script runat="server">
void Page_Load() {
    
    // Set content type
    Request.ContentType = "text/xml";
   
    DataSet ds = new DataSet();
    ds.ReadXml(Request.InputStream, XmlReadMode.Auto);
    try
    {
        DataTable sourceData = ds.Tables[0];
        String Input = sourceData.Rows[0].ItemArray[0].ToString();
        int num = sourceData.Rows[0].ItemArray.Length;
    }
    catch (Exception ex)
    {
        String err = ex.Message;
    }
    
    
    
    //StreamReader sReader = new StreamReader(Request.InputStream);
    //String Input = sReader.ReadToEnd();
    //TextWriter tWriter = new StringWriter();
    ////XmlWriter xWriter;
    //String DirectDecode = Server.HtmlDecode(Input);
    //Server.HtmlDecode(Input, tWriter);
    ////XmlReader xReader = new StringReader(xWriter.ToString());
    //String Decode = tWriter.ToString();
    //TextReader tReader = new StringReader(tWriter.ToString());
    //// Read xml stream into a dataset
    //DataSet ds = new DataSet();

    //ds.ReadXml(tReader);
    ////ds.ReadXml(Request.InputStream, XmlReadMode.Auto);

    //DataTable sourceData = ds.Tables[0];

    //sReader.Close();
    //tWriter.Close();
    //tReader.Close();
    return;
    }
</script>
